package com.learn.training.multithread.chapter8.demo2;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.concurrent.Callable;

public class Task implements Callable<String> {

    @Override
    public String call() throws Exception {
        return Thread.currentThread().getName() + "    " + longTimeCalculation();
    }

    private String longTimeCalculation() {
        return DateTimeFormatter.ISO_DATE_TIME.format(LocalDateTime.now());
    }

}
